import java.util.List;

import org.hibernate.Session;

import com.corejsf.util.SessionFactoryUtil;


public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Session session = SessionFactoryUtil.getSessionFactory().openSession();
		session.beginTransaction();
		List result = session.createQuery("from Person").list();
	    session.getTransaction().commit();
		System.out.println(result.size());
	}

}
